<template>
  <el-dialog
  title="预览文章"
  :visible="isshow"
  width="30%"
  :before-close="handleClose">
  <h4>{{showinfo.titile}}</h4>
  <p><span>{{showinfo.createTime}}</span><span> {{showinfo.username}}</span> <i class="el-icon-view"></i> <span>{{showinfo.visits}}</span></p>
  <p v-html="showinfo.articleBody"></p>
</el-dialog>
</template>

<script>
export default {
  props: {
    isshow: Boolean,
    showinfo: Object
  },
  data () {
    return {
    }
  },
  methods: {
    handleClose (done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
          this.close()
        })
        .catch(_ => {})
    },
    close () {
      this.$emit('update:isshow', false)
    }
  }
}
</script>

<style scoped lang='less'></style>
